<?php
	require 'connect.php';
//	获取试题
	session_start();
	$_SESSION['loginid'] = 'jg';
	$trainType = iconv("UTF-8","GBK",$_GET["tType"]);
	$exerciseProblemsGroup = iconv("UTF-8","GBK",$_GET["eGroup"]);
	$exerciseProblemsType = iconv("UTF-8","GBK",$_GET["eType"]);
	if (isset($_SESSION['loginid'])){
		$sql = "SpTrainExerciseProblems '$trainType','$exerciseProblemsGroup','$exerciseProblemsType'";
//		echo $sql;	
		$rs = odbc_exec($conn,$sql);
		$billInfo=array();
		$i=0; 
		while($row=odbc_fetch_array($rs))
		{
			$row["ExerciseProblems"] = iconv("GBK","UTF-8",$row["ExerciseProblems"]);
			$row["ExerciseProblemsType"] = iconv("GBK","UTF-8",$row["ExerciseProblemsType"]);
			
			$billInfo[$i]=$row; 
	       	$i++;  
		}
		odbc_close($conn);
		echo $_GET['jsoncallback']."(".json_encode($billInfo).")";
	}
				
?>